//
//  NSString+NSString_Extension.m
//  MusicPlayer-two
//
//  Created by lanou3g on 15/8/22.
//  Copyright (c) 2015年 大展宏图. All rights reserved.
//

#import "NSString+NSString_Extension.h"

@implementation NSString (NSString_Extension)

/**
 *  将数字转化成时间格式
 */
+ (NSString *)stringWithSecondsFormat:(NSString *)secondsString{

    NSInteger seconds = [secondsString integerValue];
    return [NSString stringWithFormat:@"%02ld:%02ld",seconds / 60,seconds % 60];

}

/**
 *  将数字转化成秒
 */
+ (NSString *)stringWithMilliSecondsFormat:(NSString *)milliSecondsString{
    
    NSInteger milliSeconds = [milliSecondsString integerValue];
    
    NSString *seconds = [NSString stringWithFormat:@"%ld",milliSeconds / 1000];
    return [NSString stringWithSecondsFormat:seconds];

}

/**
 *  当前时哪首歌
 */

+ (NSString *)stringWithSecondsInteger:(NSInteger )integer{
    
    return [NSString stringWithSecondsFormat:[NSString stringWithFormat:@"%ld",integer]];

}


@end
